package com.bridgeintelligent.tag.webserver.security;

import javax.annotation.PostConstruct;

import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.context.annotation.Configuration;

@Configuration
public class TagPermQueryPluginConfiguration {

    private final SqlSessionFactory sqlSessionFactory;

    public TagPermQueryPluginConfiguration(SqlSessionFactory sqlSessionFactory) {
        this.sqlSessionFactory = sqlSessionFactory;
    }

    @PostConstruct
    public void configurationCustomizer() {
        sqlSessionFactory.getConfiguration().addInterceptor(new TagPermQueryPlugin());
    }

}
